//此处放奖惩界面API接口，编写者：@3188066816
import axios from 'axios';

const apiClient = axios.create({
    //测试用后端路径
    baseURL: 'http://localhost:8000/reward/',
    headers: {
        'Content-Type': 'application/json',
    },
});

export default {
    getAll(){
        return apiClient.get('get_all/')
    },
    del_one(student_id,reward_type,reward_name,reward_date,remark){
        return apiClient.post('del_one/',{
            type:"del",
            student_id,
            reward_type,
            reward_name,
            reward_date,
            remark
        })
    },
    //加一条
    add_one(formData){
        return apiClient.post('add_one/',formData)
    },
    updata_one(formData,reward_type,reward_date,reward_name,remark){
        return apiClient.post('updata_one/',{
            formData,
            reward_type,
            reward_date,
            reward_name,
            remark,
        })
    },
    getStudentsForm(){
        return apiClient.get('get_students_form/');
    },
};
